package towerDefense;

/**
 * Projectile type Fire is a wide damage area affect on monsters. 
 * 
 * @author Guillermo Mendez-Kestler
 *
 */
public class Projectile_Fire extends T_Projectile implements I_Projectile {

	/**
	 * SPEED of the fire
	 */
	public static final double SPEED = 50;

	/**
	 * Amount of DAMAGE done by each fire at tower LEVEL.
	 */
	public static final int FIRE_LEVEL_1 = 2;
	public static final int FIRE_LEVEL_2 = 8;
	public static final int FIRE_LEVEL_3 = 15;
	public static final int FIRE_LEVEL_4 = 23;
	public static final int FIRE_LEVEL_5 = 32;

	/**
	 * The size of the bounding box for the fire. 
	 */
	private static final double FIRE_SIZE = 5;

	/**
	 * Tower that fires the bullet. 
	 */
	private static Tower_Fire FIRE_TOWER;

	/**
	 * HEADING the FIRE is traveling. 
	 */
	private static double FIRE_HEADING;
	
	/**
	 * Creates a fire object that is fired from {@link 
	 * towerDefense.Tower_Fire}
	 * 
	 * @param tower The {@link towerDefense.Tower_Fire} 
	 * that fired this fire projectile.  
	 * @param heading The direction which the fire is 
	 * going. 
	 */
	public Projectile_Fire(Tower_Fire tower, double heading){
		super(tower.getSpace().getCenterX(), tower.getSpace().getCenterY(), FIRE_SIZE, Constants.PROJECTILE_FIRE);
		FIRE_TOWER = tower;
		FIRE_HEADING = heading;
	}

	/**
	 * Returns the fire's heading, in degrees. 0 degrees is "north" and the angle
	 * increases clockwise.
	 *
	 * @return the fire's heading
	 */
	public double getHeading() {
		return FIRE_HEADING;
	}

	/**
	 * Returns the TOWER that fired the fire.
	 *
	 * @return The firing tower.
	 */
	public Tower_Fire getTower() {
		return FIRE_TOWER;
	}
}
